package self.niu.com.resume.fragment;

import android.content.Intent;
import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.baidu.mapapi.map.MapView;

import self.niu.com.resume.R;
import self.niu.com.resume.activity.MapActivity;
import self.niu.com.resume.ui.MyUtils;
import self.niu.com.resume.ui.ProgressUtils;

/**
 * A simple {@link Fragment} subclass.
 */
public class OtherFragment extends Fragment {
    private Button map;
    private View view;


    public OtherFragment() {
        // Required empty public constructor
    }

    public static OtherFragment getInstance() {
        return new OtherFragment();
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.fragment_ohter, container, false);

        map= (Button) view.findViewById(R.id.map);
        map.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ProgressUtils.getInstances().showProgress(getActivity());
                startActivity(new Intent(getActivity(), MapActivity.class));
            }
        });
        return view;
        //获取地图控件引用
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        view.clearFocus();
    }
}
